#ifndef EVENT_MANAGER_H_INCLUDED_41056460
#define EVENT_MANAGER_H_INCLUDED_41056460
//-----------------------------------------------------------------------------
// Copyright (c) 2011 David Waby
// Initially created on 03/11/2011
//-----------------------------------------------------------------------------

#include "Singleton.h"
class IEventListener;
class Event;
#include <vector>
         
//-----------------------------------------------------------------------------
class EventManager : public Singleton<EventManager>
{
public:
									EventManager();
	virtual							~EventManager();

	void							AddListener(IEventListener * i_eventListener);
	void							RemoveListener(IEventListener * i_eventListener);

	void							PostEvent(Event const & i_event);

protected:
																	
private:

	std::vector<IEventListener*>	m_listeners;
	typedef std::vector<IEventListener*>::iterator	ListenerIterator;

									EventManager(const EventManager &rhs);
									EventManager& operator = (const EventManager &rhs);
};


//-----------------------------------------------------------------------------
#endif // EVENT_MANAGER_H_INCLUDED_41056460